﻿using System.ComponentModel.Composition;
using Microsoft.Practices.Prism.MefExtensions.Modularity;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Prism.Regions;

using Warehouse.Silverlight.Core.Infrastructure;

namespace Warehouse.Silverlight.Modules.Main
{
    [ModuleExport(typeof(MainModule))]
    public class MainModule : IModule
    {
        private readonly IRegionManager _regionManager;

        [ImportingConstructor]
        public MainModule(IRegionManager regionManager)
        {
            _regionManager = regionManager;
        }

        // IModule Members
        public void Initialize()
        {
            _regionManager.RegisterViewWithRegion(RegionNames.NavigationRegion, typeof(Views.NavTreeView));
        }

    }
}
